//
//  DNTimeConsumeDao.h
//  DanoneEA
//
//  Created by Senela on 16/11/2.
//  Copyright © 2016年 翔傲科技. All rights reserved.
//

#import "DNDataBase.h"

@interface DNTimeConsumeModel : NSObject

@property (nonatomic, strong)NSString  *dateStr;
@property (nonatomic, strong)NSString  *timeForCrying;
@property (nonatomic, strong)NSString  *timeForFeeding;
@property (nonatomic, strong)NSString  *timeForStool;
@property (nonatomic, strong)NSString  *timeForApp;

@end

typedef enum : NSUInteger {
    ModuleType_None = 0,
    ModuleType_Crying = 1,
    ModuleType_Stool,
    ModuleType_Feeding,
    ModuleType_APP,
    ModuleType_Other,
} ModuleType;



/**
 *  Time Consuming for module
 */
@interface DNTimeConsumeDao : DNDataBase

+ (DNTimeConsumeDao *)shareInstance;

-(BOOL)appendTime:(NSInteger)time byType:(ModuleType)type dateStr:(NSString *)dateStr;

-(BOOL)clearTimeByDate:(NSString *)dateStr;

-(NSString *)getTimeByDate:(NSString *)dateStr  type:(ModuleType)type;

-(DNTimeConsumeModel *)getTimeConsumeByDate:(NSString *)dateStr;

@end
